﻿//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------

using Cinemachine;
using GameFramework;
using GameFramework.Fsm;
using System;
using UnityEngine;
using UnityGameFramework.Runtime;

namespace Adventure
{
    public class EnemyEntitySnail : EnemyEntity
    {
        IFsm<EnemyEntitySnail> fsm;
        protected override void OnInit(object userData)
        {
            base.OnInit(userData);
            fsm = GameEntry.Fsm.CreateFsm<EnemyEntitySnail>("SnailFSM", this,
                new IdleStateSnail(),
                new PatrolStateSnail(),
                new AttackStateSnail(),
                new HitStateSnail(),
                new DeathStateSnail()
                );

            groundOffset = new Vector2(-1.81f,-0.07f);
            touchLeftOffset = new Vector2(-1.15f,0.55f);
            touchRightOffset = new Vector2(1.15f,0.55f);
        }
        protected override void OnRecycle()
        {
            base.OnRecycle();
            GameEntry.Fsm.DestroyFsm(fsm);
        }
    }
    public class IdleStateSnail : FsmState<EnemyEntitySnail>
    {

    }
    public class PatrolStateSnail : FsmState<EnemyEntitySnail>
    {

    }
    public class AttackStateSnail : FsmState<EnemyEntitySnail>
    {

    }
    public class HitStateSnail : FsmState<EnemyEntitySnail>
    {

    }
    public class DeathStateSnail : FsmState<EnemyEntitySnail>
    {

    }
}
